3.23 \(\int \sqrt{a+b x} \sqrt{a c-b c x} (A+B x+C x^2) \, dx\)

Optimal. Leaf size=221 \[ \frac{a^2 \sqrt{c} \sqrt{a+b x} \left (a^2 C+4 A b^2\right ) \sqrt{a c-b c x} \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{8 b^3 \sqrt{a^2 c-b^2 c x^2}}+\frac{1}{8} x \sqrt{a+b x} \left (\frac{a^2 C}{b^2}+4 A\right ) \sqrt{a c-b c x}-\frac{B \sqrt{a+b x} \left (a^2-b^2 x^2\right ) \sqrt{a c-b c x}}{3 b^2}-\frac{C x \sqrt{a+b x} \left (a^2-b^2 x^2\right ) \sqrt{a c-b c x}}{4 b^2} \]

[Out]

((4*A + (a^2*C)/b^2)*x*Sqrt[a + b*x]*Sqrt[a*c - b*c*x])/8 - (B*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(a^2 - b^2*x^2)
)/(3*b^2) - (C*x*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(a^2 - b^2*x^2))/(4*b^2) + (a^2*Sqrt[c]*(4*A*b^2 + a^2*C)*Sqr
t[a + b*x]*Sqrt[a*c - b*c*x]*ArcTan[(b*Sqrt[c]*x)/Sqrt[a^2*c - b^2*c*x^2]])/(8*b^3*Sqrt[a^2*c - b^2*c*x^2])

________________________________________________________________________________________

Rubi [A]  time = 0.146967, antiderivative size = 221, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {901, 1815, 641, 195, 217, 203} \[ \frac{a^2 \sqrt{c} \sqrt{a+b x} \left (a^2 C+4 A b^2\right ) \sqrt{a c-b c x} \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{8 b^3 \sqrt{a^2 c-b^2 c x^2}}+\frac{1}{8} x \sqrt{a+b x} \left (\frac{a^2 C}{b^2}+4 A\right ) \sqrt{a c-b c x}-\frac{B \sqrt{a+b x} \left (a^2-b^2 x^2\right ) \sqrt{a c-b c x}}{3 b^2}-\frac{C x \sqrt{a+b x} \left (a^2-b^2 x^2\right ) \sqrt{a c-b c x}}{4 b^2} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(A + B*x + C*x^2),x]

[Out]

((4*A + (a^2*C)/b^2)*x*Sqrt[a + b*x]*Sqrt[a*c - b*c*x])/8 - (B*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(a^2 - b^2*x^2)
)/(3*b^2) - (C*x*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(a^2 - b^2*x^2))/(4*b^2) + (a^2*Sqrt[c]*(4*A*b^2 + a^2*C)*Sqr
t[a + b*x]*Sqrt[a*c - b*c*x]*ArcTan[(b*Sqrt[c]*x)/Sqrt[a^2*c - b^2*c*x^2]])/(8*b^3*Sqrt[a^2*c - b^2*c*x^2])

Rule 901

Int[((d_) + (e_.)*(x_))^(m_)*((f_) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :>
Dist[((d + e*x)^FracPart[m]*(f + g*x)^FracPart[m])/(d*f + e*g*x^2)^FracPart[m], Int[(d*f + e*g*x^2)^m*(a + b*x
 + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[m - n, 0] && EqQ[e*f + d*g, 0]

Rule 1815

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expon[Pq, x]]}, Si
mp[(e*x^(q - 1)*(a + b*x^2)^(p + 1))/(b*(q + 2*p + 1)), x] + Dist[1/(b*(q + 2*p + 1)), Int[(a + b*x^2)^p*Expan
dToSum[b*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, p}, x]
&& PolyQ[Pq, x] &&  !LeQ[p, -1]

Rule 641

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(e*(a + c*x^2)^(p + 1))/(2*c*(p + 1)),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \sqrt{a+b x} \sqrt{a c-b c x} \left (A+B x+C x^2\right ) \, dx &=\frac{\left (\sqrt{a+b x} \sqrt{a c-b c x}\right ) \int \sqrt{a^2 c-b^2 c x^2} \left (A+B x+C x^2\right ) \, dx}{\sqrt{a^2 c-b^2 c x^2}}\\ &=-\frac{C x \sqrt{a+b x} \sqrt{a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}-\frac{\left (\sqrt{a+b x} \sqrt{a c-b c x}\right ) \int \left (-c \left (4 A b^2+a^2 C\right )-4 b^2 B c x\right ) \sqrt{a^2 c-b^2 c x^2} \, dx}{4 b^2 c \sqrt{a^2 c-b^2 c x^2}}\\ &=-\frac{B \sqrt{a+b x} \sqrt{a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac{C x \sqrt{a+b x} \sqrt{a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac{\left (\left (4 A b^2+a^2 C\right ) \sqrt{a+b x} \sqrt{a c-b c x}\right ) \int \sqrt{a^2 c-b^2 c x^2} \, dx}{4 b^2 \sqrt{a^2 c-b^2 c x^2}}\\ &=\frac{1}{8} \left (4 A+\frac{a^2 C}{b^2}\right ) x \sqrt{a+b x} \sqrt{a c-b c x}-\frac{B \sqrt{a+b x} \sqrt{a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac{C x \sqrt{a+b x} \sqrt{a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac{\left (a^2 c \left (4 A b^2+a^2 C\right ) \sqrt{a+b x} \sqrt{a c-b c x}\right ) \int \frac{1}{\sqrt{a^2 c-b^2 c x^2}} \, dx}{8 b^2 \sqrt{a^2 c-b^2 c x^2}}\\ &=\frac{1}{8} \left (4 A+\frac{a^2 C}{b^2}\right ) x \sqrt{a+b x} \sqrt{a c-b c x}-\frac{B \sqrt{a+b x} \sqrt{a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac{C x \sqrt{a+b x} \sqrt{a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac{\left (a^2 c \left (4 A b^2+a^2 C\right ) \sqrt{a+b x} \sqrt{a c-b c x}\right ) \operatorname{Subst}\left (\int \frac{1}{1+b^2 c x^2} \, dx,x,\frac{x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{8 b^2 \sqrt{a^2 c-b^2 c x^2}}\\ &=\frac{1}{8} \left (4 A+\frac{a^2 C}{b^2}\right ) x \sqrt{a+b x} \sqrt{a c-b c x}-\frac{B \sqrt{a+b x} \sqrt{a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac{C x \sqrt{a+b x} \sqrt{a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac{a^2 \sqrt{c} \left (4 A b^2+a^2 C\right ) \sqrt{a+b x} \sqrt{a c-b c x} \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{8 b^3 \sqrt{a^2 c-b^2 c x^2}}\\ \end{align*}

Mathematica [A]  time = 0.380484, size = 142, normalized size = 0.64 \[ -\frac{c \left (b \left (b^2 x^2-a^2\right ) \left (2 b^2 x \left (6 A+4 B x+3 C x^2\right )-a^2 (8 B+3 C x)\right )+6 a^{5/2} \sqrt{a-b x} \sqrt{\frac{b x}{a}+1} \left (a^2 C+4 A b^2\right ) \sin ^{-1}\left (\frac{\sqrt{a-b x}}{\sqrt{2} \sqrt{a}}\right )\right )}{24 b^3 \sqrt{a+b x} \sqrt{c (a-b x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(A + B*x + C*x^2),x]

[Out]

-(c*(b*(-a^2 + b^2*x^2)*(-(a^2*(8*B + 3*C*x)) + 2*b^2*x*(6*A + 4*B*x + 3*C*x^2)) + 6*a^(5/2)*(4*A*b^2 + a^2*C)
*Sqrt[a - b*x]*Sqrt[1 + (b*x)/a]*ArcSin[Sqrt[a - b*x]/(Sqrt[2]*Sqrt[a])]))/(24*b^3*Sqrt[c*(a - b*x)]*Sqrt[a +
b*x])

________________________________________________________________________________________

Maple [A]  time = 0.011, size = 287, normalized size = 1.3 \begin{align*}{\frac{1}{24\,{b}^{2}}\sqrt{bx+a}\sqrt{-c \left ( bx-a \right ) } \left ( 6\,C{x}^{3}{b}^{2}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }\sqrt{{b}^{2}c}+12\,A\arctan \left ({\frac{\sqrt{{b}^{2}c}x}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}} \right ){a}^{2}{b}^{2}c+8\,B{x}^{2}{b}^{2}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }\sqrt{{b}^{2}c}+3\,C\arctan \left ({\frac{\sqrt{{b}^{2}c}x}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}} \right ){a}^{4}c+12\,A\sqrt{{b}^{2}c}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }x{b}^{2}-3\,C\sqrt{{b}^{2}c}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }x{a}^{2}-8\,B{a}^{2}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }\sqrt{{b}^{2}c} \right ){\frac{1}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}}{\frac{1}{\sqrt{{b}^{2}c}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((C*x^2+B*x+A)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2),x)

[Out]

1/24*(b*x+a)^(1/2)*(-c*(b*x-a))^(1/2)*(6*C*x^3*b^2*(-c*(b^2*x^2-a^2))^(1/2)*(b^2*c)^(1/2)+12*A*arctan((b^2*c)^
(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))*a^2*b^2*c+8*B*x^2*b^2*(-c*(b^2*x^2-a^2))^(1/2)*(b^2*c)^(1/2)+3*C*arctan((b^2
*c)^(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))*a^4*c+12*A*(b^2*c)^(1/2)*(-c*(b^2*x^2-a^2))^(1/2)*x*b^2-3*C*(b^2*c)^(1/2
)*(-c*(b^2*x^2-a^2))^(1/2)*x*a^2-8*B*a^2*(-c*(b^2*x^2-a^2))^(1/2)*(b^2*c)^(1/2))/(-c*(b^2*x^2-a^2))^(1/2)/b^2/
(b^2*c)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.14845, size = 602, normalized size = 2.72 \begin{align*} \left [\frac{3 \,{\left (C a^{4} + 4 \, A a^{2} b^{2}\right )} \sqrt{-c} \log \left (2 \, b^{2} c x^{2} + 2 \, \sqrt{-b c x + a c} \sqrt{b x + a} b \sqrt{-c} x - a^{2} c\right ) + 2 \,{\left (6 \, C b^{3} x^{3} + 8 \, B b^{3} x^{2} - 8 \, B a^{2} b - 3 \,{\left (C a^{2} b - 4 \, A b^{3}\right )} x\right )} \sqrt{-b c x + a c} \sqrt{b x + a}}{48 \, b^{3}}, -\frac{3 \,{\left (C a^{4} + 4 \, A a^{2} b^{2}\right )} \sqrt{c} \arctan \left (\frac{\sqrt{-b c x + a c} \sqrt{b x + a} b \sqrt{c} x}{b^{2} c x^{2} - a^{2} c}\right ) -{\left (6 \, C b^{3} x^{3} + 8 \, B b^{3} x^{2} - 8 \, B a^{2} b - 3 \,{\left (C a^{2} b - 4 \, A b^{3}\right )} x\right )} \sqrt{-b c x + a c} \sqrt{b x + a}}{24 \, b^{3}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2),x, algorithm="fricas")

[Out]

[1/48*(3*(C*a^4 + 4*A*a^2*b^2)*sqrt(-c)*log(2*b^2*c*x^2 + 2*sqrt(-b*c*x + a*c)*sqrt(b*x + a)*b*sqrt(-c)*x - a^
2*c) + 2*(6*C*b^3*x^3 + 8*B*b^3*x^2 - 8*B*a^2*b - 3*(C*a^2*b - 4*A*b^3)*x)*sqrt(-b*c*x + a*c)*sqrt(b*x + a))/b
^3, -1/24*(3*(C*a^4 + 4*A*a^2*b^2)*sqrt(c)*arctan(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*b*sqrt(c)*x/(b^2*c*x^2 - a^
2*c)) - (6*C*b^3*x^3 + 8*B*b^3*x^2 - 8*B*a^2*b - 3*(C*a^2*b - 4*A*b^3)*x)*sqrt(-b*c*x + a*c)*sqrt(b*x + a))/b^
3]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{- c \left (- a + b x\right )} \sqrt{a + b x} \left (A + B x + C x^{2}\right )\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x**2+B*x+A)*(b*x+a)**(1/2)*(-b*c*x+a*c)**(1/2),x)

[Out]

Integral(sqrt(-c*(-a + b*x))*sqrt(a + b*x)*(A + B*x + C*x**2), x)

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2),x, algorithm="giac")

[Out]

Timed out